3.3 \(\int (a+a \sin (c+d x)) \tan (c+d x) \, dx\)

Optimal. Leaf size=30 \[ -\frac{a \sin (c+d x)}{d}-\frac{a \log (1-\sin (c+d x))}{d} \]

[Out]

-((a*Log[1 - Sin[c + d*x]])/d) - (a*Sin[c + d*x])/d

________________________________________________________________________________________

Rubi [A]  time = 0.0212762, antiderivative size = 30, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 2, integrand size = 17, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.118, Rules used = {2707, 43} \[ -\frac{a \sin (c+d x)}{d}-\frac{a \log (1-\sin (c+d x))}{d} \]

Antiderivative was successfully verified.

[In]

Int[(a + a*Sin[c + d*x])*Tan[c + d*x],x]

[Out]

-((a*Log[1 - Sin[c + d*x]])/d) - (a*Sin[c + d*x])/d

Rule 2707

Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*tan[(e_.) + (f_.)*(x_)]^(p_.), x_Symbol] :> Dist[1/f, Subst[I
nt[(x^p*(a + x)^(m - (p + 1)/2))/(a - x)^((p + 1)/2), x], x, b*Sin[e + f*x]], x] /; FreeQ[{a, b, e, f, m}, x]
&& EqQ[a^2 - b^2, 0] && IntegerQ[(p + 1)/2]

Rule 43

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d
*x)^n, x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && IGtQ[m, 0] && ( !IntegerQ[n] || (EqQ[c, 0]
&& LeQ[7*m + 4*n + 4, 0]) || LtQ[9*m + 5*(n + 1), 0] || GtQ[m + n + 2, 0])

Rubi steps

\begin{align*} \int (a+a \sin (c+d x)) \tan (c+d x) \, dx &=\frac{\operatorname{Subst}\left (\int \frac{x}{a-x} \, dx,x,a \sin (c+d x)\right )}{d}\\ &=\frac{\operatorname{Subst}\left (\int \left (-1+\frac{a}{a-x}\right ) \, dx,x,a \sin (c+d x)\right )}{d}\\ &=-\frac{a \log (1-\sin (c+d x))}{d}-\frac{a \sin (c+d x)}{d}\\ \end{align*}

Mathematica [A]  time = 0.0212587, size = 38, normalized size = 1.27 \[ -\frac{a \sin (c+d x)}{d}+\frac{a \tanh ^{-1}(\sin (c+d x))}{d}-\frac{a \log (\cos (c+d x))}{d} \]

Antiderivative was successfully verified.

[In]

Integrate[(a + a*Sin[c + d*x])*Tan[c + d*x],x]

[Out]

(a*ArcTanh[Sin[c + d*x]])/d - (a*Log[Cos[c + d*x]])/d - (a*Sin[c + d*x])/d

________________________________________________________________________________________

Maple [A]  time = 0.031, size = 29, normalized size = 1. \begin{align*} -{\frac{a\sin \left ( dx+c \right ) }{d}}-{\frac{a\ln \left ( \sin \left ( dx+c \right ) -1 \right ) }{d}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+a*sin(d*x+c))*tan(d*x+c),x)

[Out]

-a*sin(d*x+c)/d-1/d*a*ln(sin(d*x+c)-1)

________________________________________________________________________________________

Maxima [A]  time = 1.07582, size = 34, normalized size = 1.13 \begin{align*} -\frac{a \log \left (\sin \left (d x + c\right ) - 1\right ) + a \sin \left (d x + c\right )}{d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+a*sin(d*x+c))*tan(d*x+c),x, algorithm="maxima")

[Out]

-(a*log(sin(d*x + c) - 1) + a*sin(d*x + c))/d

________________________________________________________________________________________

Fricas [A]  time = 1.37141, size = 65, normalized size = 2.17 \begin{align*} -\frac{a \log \left (-\sin \left (d x + c\right ) + 1\right ) + a \sin \left (d x + c\right )}{d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+a*sin(d*x+c))*tan(d*x+c),x, algorithm="fricas")

[Out]

-(a*log(-sin(d*x + c) + 1) + a*sin(d*x + c))/d

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} a \left (\int \sin{\left (c + d x \right )} \tan{\left (c + d x \right )}\, dx + \int \tan{\left (c + d x \right )}\, dx\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+a*sin(d*x+c))*tan(d*x+c),x)

[Out]

a*(Integral(sin(c + d*x)*tan(c + d*x), x) + Integral(tan(c + d*x), x))

________________________________________________________________________________________

Giac [B]  time = 1.61062, size = 1966, normalized size = 65.53 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+a*sin(d*x+c))*tan(d*x+c),x, algorithm="giac")

[Out]

-1/2*(a*log(2*(tan(1/2*c)^2 + 1)/(tan(1/2*d*x)^4*tan(1/2*c)^2 + 2*tan(1/2*d*x)^4*tan(1/2*c) + 2*tan(1/2*d*x)^3
*tan(1/2*c)^2 + tan(1/2*d*x)^4 + 2*tan(1/2*d*x)^2*tan(1/2*c)^2 - 2*tan(1/2*d*x)^3 + 2*tan(1/2*d*x)*tan(1/2*c)^
2 + 2*tan(1/2*d*x)^2 + tan(1/2*c)^2 - 2*tan(1/2*d*x) - 2*tan(1/2*c) + 1))*tan(1/2*d*x)^2*tan(1/2*c)^2 - a*log(
2*(tan(1/2*c)^2 + 1)/(tan(1/2*d*x)^4*tan(1/2*c)^2 - 2*tan(1/2*d*x)^4*tan(1/2*c) - 2*tan(1/2*d*x)^3*tan(1/2*c)^
2 + tan(1/2*d*x)^4 + 2*tan(1/2*d*x)^2*tan(1/2*c)^2 + 2*tan(1/2*d*x)^3 - 2*tan(1/2*d*x)*tan(1/2*c)^2 + 2*tan(1/
2*d*x)^2 + tan(1/2*c)^2 + 2*tan(1/2*d*x) + 2*tan(1/2*c) + 1))*tan(1/2*d*x)^2*tan(1/2*c)^2 + a*log(4*(tan(c)^2
+ 1)/(tan(d*x)^4*tan(c)^2 - 2*tan(d*x)^3*tan(c) + tan(d*x)^2*tan(c)^2 + tan(d*x)^2 - 2*tan(d*x)*tan(c) + 1))*t
an(1/2*d*x)^2*tan(1/2*c)^2 + a*log(2*(tan(1/2*c)^2 + 1)/(tan(1/2*d*x)^4*tan(1/2*c)^2 + 2*tan(1/2*d*x)^4*tan(1/
2*c) + 2*tan(1/2*d*x)^3*tan(1/2*c)^2 + tan(1/2*d*x)^4 + 2*tan(1/2*d*x)^2*tan(1/2*c)^2 - 2*tan(1/2*d*x)^3 + 2*t
an(1/2*d*x)*tan(1/2*c)^2 + 2*tan(1/2*d*x)^2 + tan(1/2*c)^2 - 2*tan(1/2*d*x) - 2*tan(1/2*c) + 1))*tan(1/2*d*x)^
2 - a*log(2*(tan(1/2*c)^2 + 1)/(tan(1/2*d*x)^4*tan(1/2*c)^2 - 2*tan(1/2*d*x)^4*tan(1/2*c) - 2*tan(1/2*d*x)^3*t
an(1/2*c)^2 + tan(1/2*d*x)^4 + 2*tan(1/2*d*x)^2*tan(1/2*c)^2 + 2*tan(1/2*d*x)^3 - 2*tan(1/2*d*x)*tan(1/2*c)^2
+ 2*tan(1/2*d*x)^2 + tan(1/2*c)^2 + 2*tan(1/2*d*x) + 2*tan(1/2*c) + 1))*tan(1/2*d*x)^2 + a*log(4*(tan(c)^2 + 1
)/(tan(d*x)^4*tan(c)^2 - 2*tan(d*x)^3*tan(c) + tan(d*x)^2*tan(c)^2 + tan(d*x)^2 - 2*tan(d*x)*tan(c) + 1))*tan(
1/2*d*x)^2 - 4*a*tan(1/2*d*x)^2*tan(1/2*c) + a*log(2*(tan(1/2*c)^2 + 1)/(tan(1/2*d*x)^4*tan(1/2*c)^2 + 2*tan(1
/2*d*x)^4*tan(1/2*c) + 2*tan(1/2*d*x)^3*tan(1/2*c)^2 + tan(1/2*d*x)^4 + 2*tan(1/2*d*x)^2*tan(1/2*c)^2 - 2*tan(
1/2*d*x)^3 + 2*tan(1/2*d*x)*tan(1/2*c)^2 + 2*tan(1/2*d*x)^2 + tan(1/2*c)^2 - 2*tan(1/2*d*x) - 2*tan(1/2*c) + 1
))*tan(1/2*c)^2 - a*log(2*(tan(1/2*c)^2 + 1)/(tan(1/2*d*x)^4*tan(1/2*c)^2 - 2*tan(1/2*d*x)^4*tan(1/2*c) - 2*ta
n(1/2*d*x)^3*tan(1/2*c)^2 + tan(1/2*d*x)^4 + 2*tan(1/2*d*x)^2*tan(1/2*c)^2 + 2*tan(1/2*d*x)^3 - 2*tan(1/2*d*x)
*tan(1/2*c)^2 + 2*tan(1/2*d*x)^2 + tan(1/2*c)^2 + 2*tan(1/2*d*x) + 2*tan(1/2*c) + 1))*tan(1/2*c)^2 + a*log(4*(
tan(c)^2 + 1)/(tan(d*x)^4*tan(c)^2 - 2*tan(d*x)^3*tan(c) + tan(d*x)^2*tan(c)^2 + tan(d*x)^2 - 2*tan(d*x)*tan(c
) + 1))*tan(1/2*c)^2 - 4*a*tan(1/2*d*x)*tan(1/2*c)^2 + a*log(2*(tan(1/2*c)^2 + 1)/(tan(1/2*d*x)^4*tan(1/2*c)^2
 + 2*tan(1/2*d*x)^4*tan(1/2*c) + 2*tan(1/2*d*x)^3*tan(1/2*c)^2 + tan(1/2*d*x)^4 + 2*tan(1/2*d*x)^2*tan(1/2*c)^
2 - 2*tan(1/2*d*x)^3 + 2*tan(1/2*d*x)*tan(1/2*c)^2 + 2*tan(1/2*d*x)^2 + tan(1/2*c)^2 - 2*tan(1/2*d*x) - 2*tan(
1/2*c) + 1)) - a*log(2*(tan(1/2*c)^2 + 1)/(tan(1/2*d*x)^4*tan(1/2*c)^2 - 2*tan(1/2*d*x)^4*tan(1/2*c) - 2*tan(1
/2*d*x)^3*tan(1/2*c)^2 + tan(1/2*d*x)^4 + 2*tan(1/2*d*x)^2*tan(1/2*c)^2 + 2*tan(1/2*d*x)^3 - 2*tan(1/2*d*x)*ta
n(1/2*c)^2 + 2*tan(1/2*d*x)^2 + tan(1/2*c)^2 + 2*tan(1/2*d*x) + 2*tan(1/2*c) + 1)) + a*log(4*(tan(c)^2 + 1)/(t
an(d*x)^4*tan(c)^2 - 2*tan(d*x)^3*tan(c) + tan(d*x)^2*tan(c)^2 + tan(d*x)^2 - 2*tan(d*x)*tan(c) + 1)) + 4*a*ta
n(1/2*d*x) + 4*a*tan(1/2*c))/(d*tan(1/2*d*x)^2*tan(1/2*c)^2 + d*tan(1/2*d*x)^2 + d*tan(1/2*c)^2 + d)